{% extends 'blog/index.html' %}
{% block title %}更改头像{% endblock %}

{% block main %}
<div id="change-image" class="well clearfix">
    <h1>头像设置</h1>
    <div class="panel-body">
        <form role="form" id="upload-image-form" action="{% url 'AppLogin:changeimage' %}" method="POST" enctype="multipart/form-data">
            {% csrf_token %}
            <div class="form-group">
                <label class="control-label">当前头像：</label>
                <img src="{{ MEDIA_URL }}{{ user.image }}" width="250px" height="250px">
                <div class="col-md-9">
                    {{ form.as_p }}
                </div>
            </div>
            <div class="form-group">
                <div class="col-md-offset-3 col-md-9">
                    <button class="btn btn-danger" type="submit">上传头像</button>
                </div>
            </div>
        </form>
    </div>
</div>
{% endblock %}
